﻿using SeckillService.Model;
using SeckillService.Services.Dtos;
using Volo.Abp.Domain.Repositories;

namespace SeckillService.Repositorys
{
    public interface ISeckillRepository : IRepository<Seckill, Guid>
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="SeckillId"></param>
        /// <returns></returns>
        Task<List<SeckillProduct>> GetSeckillProductsAsync(Guid SeckillId);

        /// <summary>
        /// 根据秒杀商品id
        /// </summary>
        /// <param name="SeckillProductId"></param>
        /// <returns></returns>
        Task<SeckillProduct> GetSeckillProductAsync(Guid SeckillProductId);

        /// <summary>
        /// 根据商品id
        /// </summary>
        /// <param name="ProductId"></param>
        /// <returns></returns>
        Task<SeckillProduct> GetSeckillProductByProductIdAsync(Guid SeckillProductId);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="updateSeckillProductStockDto"></param>
        /// <returns></returns>
        Task UpdateSeckillProductStockAsync(SeckillProduct seckillProduct);
    }
}
